$(function() {
	(function() {
		TOP.api('rest', 'get', {
			method : 'taobao.widget.loginstatus.get'
		}, function(resp) {
			alert(resp);
			if (resp == "false") {
				alert("领取淘宝优惠劵，请先登录淘宝网。登录完后再来领取吧！");
				window.open("https://login.taobao.com/member/login.jhtml");
				window.location = "/taobao/coupons_nav.htm?reason=3"
				return false;
			} else {
				alert("用户已登录!");
			}
		})
	})();
});
